package cn.edu.zju.gis.disasterBE.sever.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.sql.Date;
import java.sql.Timestamp;

@Data
@TableName("search_tweet")
@ApiModel("推特表")
public class Twitter implements Entity<String>{
    @TableId(value = "tweet_id", type = IdType.AUTO)
    @ApiModelProperty(value = "推特id")
    private String tweetId;

    @TableField(value = "user_id")
    @ApiModelProperty(value = "推特用户id")
    private String userid;

    @TableField(value = "user_name")
    @ApiModelProperty(value = "推特用户名")
    @JSONField(name = "username")
    private String username;

    @TableField(value = "created_time")
    @ApiModelProperty(value = "推特时间")
    private Date creatTime;

    @TableField(value = "tweet_text")
    @ApiModelProperty(value = "推特内容")
    //@JSONField(name = "text")
    private String tweetText;

    @TableField(value = "comment_count")
    @ApiModelProperty(value = "评论数")
    private Integer commentCount;

    @TableField(value = "share_count")
    @ApiModelProperty(value = "转发数")
    private Integer shareCount;

    @TableField(value = "like_count")
    @ApiModelProperty(value = "点赞数")
    private Integer likeCount;

    @TableField(value = "image_local_url")
    @ApiModelProperty(value = "影像本地地址")
    //@JSONField(name = "localUrl")
    private String imageLocalUrl;

    @TableField(value = "image_url")
    @ApiModelProperty(value = "影像地址")
    //@JSONField(name = "Url")
    private String imageUrl;

    @Override
    public String id()
    {
        return tweetId;
    }
}
